<?php
$this->pageTitle=Yii::app()->name . ' - Logeo';

Yii::app()->clientScript->registerCoreScript('jquery',CClientScript::POS_END);

$fileScriptPath = Yii::app()->baseUrl.'/script/modules/persona';
Yii::app()->clientScript->registerScriptFile($fileScriptPath.'/usuario.js',CClientScript::POS_END);
Yii::app()->clientScript->registerScript('inicioLogeo','var usuario = new Usuario;usuario.setLoginEvent();',CClientScript::POS_END);
Yii::app()->clientScript->registerScript('setearFormulario','usuario.cambiarFormularioLogin();',CClientScript::POS_END);
?>
<article>
<?php 
	$form=$this->beginWidget(
								'CActiveForm', 
								array(
										'id'=>'login',
										'enableClientValidation'=>false,
										'clientOptions'=>array(
																'validateOnSubmit'=>true,
										),
								)
	);
?>
	<header>
		<img id="imageLogo" alt="logocup" src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/LogoNuevoCUP.jpg" width="225" height="74">
		<h1><?php echo Yii::t('persona_etiqueta', 'Iniciar Sesion');?></h1>
	</header>
	<fieldset id="inputs">
	<?php 
		echo $form->dropDownList(
    							$model,
                                'typeDocument',
                                CHtml::listData(
                                					TipoDocumento::model()->findAll(),
                                					'tipodocumento_id',
													'tipodocumento_abreviacion'
                                                   )

											);
		echo $form->textField($model,'username');
		echo $form->error($model,'username'); 
		
		echo $form->passwordField($model,'password');
		echo $form->error($model,'password');
	
		echo $form->checkBox($model,'rememberMe');
		echo $form->label($model,'rememberMe');
		echo $form->error($model,'rememberMe'); 
	?>
	</fieldset>

	<fieldset id="actions">
		<div class="rememberMe">
		<?php 
				echo $form->radioButtonList($model, 'typeLogin',
											array(
													'Alumno' => 'Alumno',
													'Administracion' => 'Administraci&oacute;n',
                            						'Docente' => 'Docente'
											),
											array( 'separator' => " | " ) 
				);        
				echo $form->error($model,'rememberMe');
				
			?>
		</div>
		<div class="">
		<?php  echo CHtml::submitButton(Yii::t('etiqueta_nucleo', 'Ingresar'),array("id"=>"submit"));?>
		</div>
	</fieldset>
	<?php $this->endWidget(); ?>
	<!-- form -->
	</article>



